﻿Imports System.Data
Imports System.Data.Odbc
Imports WSEntidades
Public Class ajusteCFact
    Public Shared Function Build(ByVal dr As OdbcDataReader) As AjusteCambiario
        Dim tmpAjusteCambiario As AjusteCambiario = New AjusteCambiario()
        Try
            With tmpAjusteCambiario
                .Dif = convertDTFromDb.convertInt32(dr.Item("Dif"))
                .Factura = convertDTFromDb.convertInt32(dr.Item("Factura"))
                .Fecha = convertDTFromDb.convertDateTime(dr.Item("Fecha"))
                .IdCliente = convertDTFromDb.ConvertString(dr.Item("IdCliente"))
                .ImporteF = convertDTFromDb.ConvertString(dr.Item("ImporteF"))
                .ImporteP = convertDTFromDb.convertInt32(dr.Item("ImporteP"))
                .Serie = convertDTFromDb.convertInt32(dr.Item("Serie"))
                .Tipo = convertDTFromDb.convertInt32(dr.Item("Tipo"))
                .TipoC1 = convertDTFromDb.ConvertString(dr.Item("TipoC1"))
                .TipoC2 = convertDTFromDb.ConvertString(dr.Item("TipoC2"))
                .TipoD = convertDTFromDb.convertInt32(dr.Item("TipoD"))
                .Usr = convertDTFromDb.convertInt32(dr.Item("Usr"))

            End With
            Return tmpAjusteCambiario
        Catch ex As Exception
            Throw
        Finally
            tmpAjusteCambiario = Nothing
        End Try
    End Function
End Class
